a =(input())
if a =="1" or a == "январь" or a == "january" or a == "Январь" or a == "January" or a == "ЯНВАРЬ":
    print("31")
elif a =="2" or a == "февраль" or a == "february" or a == "Февраль" or a == "February" or a == "ФЕВРАЛЬ":
    print("28")
elif a =="3" or a == "март" or a == "march" or a == "Март" or a == "March" or a == "МАРТ":
    print("31")
elif a =="4" or a == "апрель" or a == "april" or a == "Апрель" or a == "April" or a == "АПРЕЛЬ":
    print("30")
elif a =="5" or a == "май" or a == "may" or a == "Май" or a == "May" or a == "МАЙ":
    print("31")
elif a =="6" or a == "июнь" or a == "june" or a == "Июнь" or a == "June" or a == "ИЮНЬ":
    print("30")
elif a =="7" or a == "июль" or a == "july" or a == "Июль" or a == "July" or a == "ИЮЛЬ":
    print("31")
elif a =="8" or a == "август" or a == "august" or a == "Август" or a == "August" or a == "АВГУСТ":
    print("31")
elif a =="9" or a == "сентябрь" or a == "september" or a == "Сентябрь" or a == "September" or a == "СЕНТЯБРЬ":
    print("30")
elif a =="10" or a == "октябрь" or a == "Ooctober" or a == "Октябрь" or a == "October" or a == "ОКТЯБРЬ":
    print("31")
elif a =="11" or a == "ноябрь" or a == "november" or a == "Ноябрь" or a == "November" or a == "НОЯБРЬ":
    print("30")
elif a =="12" or a == "декабрь" or a == "december" or a == "Декабрь" or a == "December" or a == "ДЕКАБРЬ":
    print("31")
else:
    print("не правильно")
А

